﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbToDocument.Core.LiteDB
{
    /// <summary>
    /// 数据库相关配置
    /// </summary>
    public class LiteDBConfig
    {
        /// <summary>
        /// 数据库保存
        /// </summary>
        public static string DBConnectString
        {
            get
            {
                string dbDir = Path.Combine(Directory.GetCurrentDirectory(), "Data");
                if (!Directory.Exists(dbDir)) Directory.CreateDirectory(dbDir);
                string dbPath = Path.Combine(dbDir, "DbToDocumentLiteDB.db");
                return dbPath;
            }
        }
    }
}
